package com.coder.base;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import util.IdWorker;

/**
 * @BelongsProject:coder_parent
 * @BelongsPackage:com.coder.base
 * @Author:linchong
 * @CreateTime:2018-12-28 13:14
 * @Description:启动类
 */
@SpringBootApplication
@EnableEurekaClient
public class BaseApplication {
    public static void main(String[] args) {
        SpringApplication.run(BaseApplication.class,args);
    }

    //注入bean
    @Bean
    public IdWorker idWorker(){
        return new IdWorker(1,1);
    }
}
